<include file="Admin@Public/header" /> 

<div class="col-sm-10 col-sm-offset-3 col-md-10 col-md-offset-2 main">
    <ol class="breadcrumb">
      <li>所有用户</li>
      <li>用户角色</li>
      <li class="active">编辑</li>
    </ol>
     

<form  class="form-horizontal" role="form" action="__URL__/save" >
  <input type="hidden" name="inputId" value="{$role.id}" > 
  <div class="form-group">
    <label for="inputName" class="col-sm-2 control-label">角色名</label>
    <div class="col-sm-4">
      <input type="text" class="form-control" id="inputName" name="inputName" placeholder="请输入角色名" datatype="*2-12" errormsg="<i class='icon-warning-sign'></i> 角色名在2~12位之间"  nullmsg="<i class='icon-warning-sign'></i> 请填写角色名！" value="{$role.name}">
    </div>
    <div class="Validform_checktip">
       <div class="Validform-info">角色名至少2个字符,最多12个字符<span class="dec"><s class="dec1">&#9670;</s><s class="dec2">&#9670;</s></span></div>
    </div>
  </div>
  <div class="form-group">
    <label for="inputStatus" class="col-sm-2 control-label">操作列表</label>
    <div class="col-sm-4">
      <div class="table-responsive">
         <table class="table">
              <thead>
                <tr>
                  <th class="col-md-1">#</th>
                  <th class="col-md-3">菜单</th>
                </tr>
              </thead>
            <tbody>
        <volist name="menus" id="vo" key="num">
          <?php $menuidsArr =explode(',',$role['menuids']) ; $ischecked=in_array($vo['id'],$menuidsArr) ;?>
              <tr>
                <td><input type="checkbox" name="inputMenuids[]" value="{$vo.id}" <notempty name="ischecked">checked</notempty> ></td>
                <td><span style="padding-left:<?php echo ($vo["sort"]*20); ?>px">{$vo.html}{$vo.name}</span></td>
              </tr>
        </volist>  
            </tbody>
            <tfoot>
              <tr class="info">
                   <td colspan="20"><input type="checkbox" name="checkbox_all" value="0"> 全选</td>
              </tr>
            </tfoot> 
          </table>
      </div>
    </div>
  </div>
   
  <div class="form-group">
    <label for="inputStatus" class="col-sm-2 control-label"> </label>
    <div class="col-sm-4">
      <input type="button" class="btn btn-primary" value="编辑" id="btn_sub"/>
       <a href="__URL__/index" class="btn btn-default" >返回</a>
  </div>
</div>
</form> 
            
            
</div>

<include file="Admin@Public/script_list" />
<include file="Admin@Public/script_form" />
<include file="Admin@Public/footer" /> 
   
